Personal computer systems are well known in the art. Personal computer systems in general, and IBM Personal Computers in particular, have attained widespread use for providing computer power to many segments of today's modern society. Personal computers can typically be defined as a desktop, floor standing, or portable microcomputer that is comprised of a system unit having a single central processing unit (CPU) and associated volatile and non-volatile memory, including all RAM and BIOS ROM, a system monitor, a keyboard, one or more flexible diskette drives, a fixed disk storage drive (also known as a "hard drive"), a so-called "mouse" pointing device, and an optional printer. One of the distinguishing characteristics of these systems is the use of a motherboard or system planar to electrically connect these components together. These systems are designed primarily to give independent computing power to a single user and are inexpensively priced for purchase by individuals or small businesses. Examples of such personal computer systems are IBM's PERSONAL COMPUTER AT and IBM's PERSONAL SYSTEM/1 (IBM PS/1).
Personal computer systems are typically used to run software to perform such diverse activities as word processing, manipulation of data via spread-sheets, collection and relation of data in databases, displays of graphics, design of electrical or mechanical systems using system-design software, etc.
The first four related applications disclose a computer system having four power management states: a normal operating state, a standby state, a suspend state, and an off state. One switch is used to change between the off state, the normal operating state, and the suspend state.
The normal operating state of the computer system of the present invention is virtually identical to the normal operating state of any typical desktop computer. Users may use applications and basically treat the computer as any other. One difference is the presence of a power management driver, which runs in the background (in the BIOS and the operating system), transparent to the user. The portion of the power management driver in the operating system (OS) is the Advanced Power Management (APM) advanced programming interface written by Intel and Microsoft, which is now present in most operating systems written to operate on Intel's 80X86 family of processors. The portion of the power management driver in BIOS (APM BIOS) communicates with the APM OS driver. The APM OS driver and the APM BIOS routines together control the computer's transition to and from the other three states.
The second state, the standby state, uses less power than the normal operating state, yet leaves any applications executing as they would otherwise execute. In general, power is conserved in the standby state by placing devices in their respective low-power modes. For example, power is conserved in the standby state by ceasing the revolutions of the fixed disk within the hard drive and by ceasing generating the video signal.
The third state is the suspend state. In the suspend state, computer system consumes an extremely small amount of power. The suspended computer consumes very little power from the wall outlet. The only power consumed is small amount of power to maintain the circuitry that monitors the switch from a battery inside the computer system (when the system is not receiving AC power) or a small amount of power generated at an auxiliary power line by the power supply (when the system is receiving AC power).
This small use of power is accomplished by saving the state of the computer system to the fixed disk storage device (the hard drive) before the power supply is turned "off." To enter the suspend state, the computer system interrupts any executing code and transfers control of the computer to the power management driver. The power management driver ascertains the state of the computer system and writes the state of the computer system to the fixed disk storage device. The state of the CPU registers, the CPU cache, the system memory, the system cache, the video registers, the video memory, and the other devices' registers are all written to the fixed disk. The entire state of the system is saved in such a way that it can be restored without the code applications being adversely affected by the interruption. The computer then writes data to the non-volatile CMOS memory indicating that the system was suspended. Lastly, the computer causes the power supply to stop producing power. The entire state of the computer is safely saved to the fixed disk storage device, system power is now "off," and computer is now only receiving a small amount of regulated power from the power supply to power the circuitry that monitors the switch.
The fourth and final state is the off state. In this state, the power supply ceases providing regulated power to the computer system, but the state of the computer system has not been saved to the fixed disk. The off state is virtually identical to typical desktop computers being turned off in the usual manner.
Switching from state to state is handled by the power management driver and is typically based on closure events of a single switch, a flag, and two timers: the inactivity standby timer and the inactivity suspend timer. The system has a single power button. This button can be used to turn on the computer system, suspend the state of the system, restore the state of the system, and turn off the system.
The above system uses advanced power management (APM) to facilitate the state transitions and system maintenance associated with the state transitions. APM is an industry standard advanced programming interface that was developed to provide a way for operating systems and system BIOS in desk top and notebook computer systems to cooperatively manage power. APM provides an excellent tool that facilitates suspending and resuming the system because it involves the operating system in the suspend process and allows the operating system to prepare the system before the suspend process occurs.
However, depending on the operating system, relying on APM for suspending the system can have several draw backs. In Microsoft Windows Version 3.1 and MS-DOS, there are times when the operating system APM driver completely stops serving APM BIOS requests. For example, when a modal dialog box is displayed, the Microsoft Windows APM driver completely stops servicing APM BIOS requests. Consequently, a suspend and resume system based on the Microsoft Windows APM driver will never suspend the system when a modal dialog box is being displayed. This presents a major problem to the user because the system does not suspend in response to the user's request to save the system state. The result can lead to user confusion and the user distrusting the suspend and resume system because it cannot be depended upon.
One solution is to rely upon the hardware system management interrupts (SMI's) to suspend the system, but such a system loses out on the benefits provided by APM. For example, the APM driver can inform all APM aware software and hardware applications that the system is about to be suspended and they can react accordingly. Therefore, it is desirable to have a system that would allow the system to depend upon the APM drivers, but when the APM drivers stop working, still be able to suspend the system.